Function Reference

StringLeft

Returns a number of characters from the left-hand side of a string.

StringLeft ( "string", count )

 

Parameters

string The string to evaluate.
count The number of characters to get.

 

Return Value

Returns a string containing the leftmost count characters of the string.

 

Remarks

If count exceeds string length, the entire string is returned.
If count is negative, an empty string is returned.

 

Related

String, StringInStr, StringLen, StringLower, StringMid, StringRight, StringTrimLeft, StringTrimRight, StringUpper

 

Example


$result = StringLeft("I am a string", 3)
MsgBox(0, "Leftmost 3 characters are:", $result)